@import 'variable';
@import 'mixin';
@import 'keyframe';
.ui-selection{
  position: relative;
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 38px;
  margin-bottom: 15px;
  border: 1px solid #ced4da;
  font-size: 14px;
  background: #fff;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  cursor: pointer;
  &:hover{
    border-color: rgba(34,36,38,.35);
  }
  &.inline-block{
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 0;
  }
  &:after{
    content: '';
    position: absolute;
    opacity: .8;
    right: 5px;
    top: 50%;
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 5px dashed #555;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity .1s ease;
  }
  select{
    display: none;
  }
  .text{
    height: 24px;
    padding: 6px 15px;
    font-size: inherit;
    line-height: 24px;
    color: #555;
    white-space: nowrap;
    word-wrap: break-word;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .ui-selection-options{
    display: none;
    position: absolute;
    z-index: 11;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 204px;
    margin: 0 -1px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #ced4da;
    background-color: #fff;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 3px 0 rgba(34,36,38,.15);
    transform-origin: center top;
    transition: opacity .1s ease;
    will-change: transform, opacity;
    li{
      display: block;
      padding: 10px 15px;
      font-size: inherit;
      line-height: 1em;
      color: rgba(0,0,0,.65);
      cursor: pointer;
      &:hover{
        background-color: rgba(0,0,0,.05);
      }
      &.selected{
        background-color: rgba(0,0,0,.03);
        color: rgba(0,0,0,.95);
      }
      &.header{
        padding: 20px 15px 10px 15px;
        color: #222;
        font-weight: 600;
        &:hover{
          background-color: #fff;
          cursor: default;
        }
      }
    }
  }
  &.size-sm{
    height: 32px;
    font-size: 12px;
    .text{
      height: 20px;
      padding: 5px 15px;
      line-height: 20px;
    }
    .ui-selection-options{
      max-height: 192px;
    }
  }
  &.active{
    border-radius: 4px 4px 0 0;
    border-color: #96c8da;
    &:after{
      opacity: 1;
    }
    .ui-selection-options{
      display: block;
      border-color: #96c8da;
      animation: dropdown .3s ease both;
    }
  }
}